import fp from 'fastify-plugin';
import { FastifyInstance } from 'fastify';

import { loadAppConfig } from '../config/loader';

export default fp(async (fastify: FastifyInstance) => {
  // Simulate a DB connection
  fastify.decorate('appConfig', loadAppConfig());
});
